<?php
		
	$month= $_GET["catid"];
	$year = $_GET['year'];
	
	if($month)
	{
		$d=cal_days_in_month(CAL_GREGORIAN,$month,$year);
	}
?>
<select name="day" id="day" class="select Rmargin15">
<option value="">Day</option> 
<?php if($d){
	for($i=1; $i<=$d; $i++){?> 
		<option value="<?php echo $i;?>"><?php echo $i;?></option> 
	<?php }
}?>  
</select>   